package com.example.demo01.Service.mobileService;

import com.example.demo01.Dao.mobileDao.ServePointDao;
import com.example.demo01.Entity.mobileEntity.ServePoint;
import com.example.demo01.Entity.mobileEntity.ServicePointEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ServePointService {
    @Autowired
    private ServePointDao servePointDao;

    /**
     * 获取超市点集合
     */
    public List<ServePoint> getSuperMarketList(String lng,String lat) { return servePointDao.getSuperMarketList(lng, lat);}

    /**
     * 获取医疗点集合
     */
    public List<ServePoint> getHospitalList(String lng,String lat) {return servePointDao.getHospitalList(lng, lat); }

    /**
     * 获取休闲点集合
     */
    public List<ServePoint> getSceneryPointList(String lng,String lat) {return servePointDao.getSceneryPointList(lng, lat);}

    /**
     * 获取(lng,lat)周围3km范围内的服务点
     * @param lng 经度
     * @param lat 纬度
     * @return (lng,lat)周围3km范围内的服务点列表
     */
    public List<ServicePointEntity> getServePointByBuffer(String lng, String lat) { return servePointDao.getServePointByBuffer(lng,lat); }


}
